home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / free.c < prev    next >
C/C++ Source or Header  |  1996-01-30  |  1KB  |  41 lines

  1. /*
  2.     GWAda Development Environment for 386/486 PCs   
  3.     Copyright (C) 1993, Arthur Vargas Lopes  & Michael Bliss Feldman
  4.                         vlopes@vortex.ufrgs.br mfeldman@seas.gwu.edu
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; version 2 of the License.    
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. /* free.c */
  21.  
  22. #include "externs.h"
  23.  
  24.  
  25.  
  26. void AVL_FREE_ALL()
  27. {
  28.     AVL_EDIT_WINDOW_PTR w;
  29.     AVL_LINE_PTR t, t2;
  30.     w = &avl_windows[avl_window];
  31.     if (w -> changed && avl_window == 0) 
  32.         if (AVL_QUESTION("Save current text before exiting (Y/N) ? ") == 'Y')
  33.             AVL_SAVE();
  34.     for (t = w -> head -> next; t != w -> head; t = t2) {
  35.         t2 = t -> next;
  36.         free(t);
  37.         }
  38.     free(w -> head);
  39.     w -> head = w -> current_line = NULL;
  40. }
  41.